home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / demos / VisualAge for Java 2.0 Entry / setup / data1.cab / ide-e / IDE / cache / TCTJ37 (.txt) < prev    next >
Encoding:
Java Class File  |  1998-09-16  |  1.4 KB  |  29 lines

  1. package com.sun.java.swing.plaf.basic;
  2.  
  3. import com.sun.java.swing.event.ListSelectionEvent;
  4. import com.sun.java.swing.event.ListSelectionListener;
  5. import java.io.Serializable;
  6.  
  7. public class BasicListUI$SelectionListener implements ListSelectionListener, Serializable {
  8.    // $FF: synthetic field
  9.    BasicListUI this$0;
  10.  
  11.    public void valueChanged(ListSelectionEvent e) {
  12.       this.this$0.maybeUpdateLayoutState();
  13.       int minY = this.this$0.convertRowToY(e.getFirstIndex());
  14.       int maxY = this.this$0.convertRowToY(e.getLastIndex());
  15.       if (minY != -1 && maxY != -1) {
  16.          maxY += this.this$0.getRowHeight(e.getLastIndex());
  17.          this.this$0.list.repaint(0, minY, this.this$0.list.getWidth(), maxY - minY);
  18.       } else {
  19.          this.this$0.list.repaint(0, 0, this.this$0.list.getWidth(), this.this$0.list.getHeight());
  20.       }
  21.  
  22.    }
  23.  
  24.    // $FF: synthetic method
  25.    public BasicListUI$SelectionListener(BasicListUI this$0) {
  26.       this.this$0 = this$0;
  27.    }
  28. }
  29.